import csv
from matplotlib import pyplot as plt
import numpy as np




def graph():
    dv = np.loadtxt('test_PCA.csv', delimiter=',')
    print(dv)
    fig = plt.figure()
    ax = fig.add_subplot(1, 1, 1)
    x = dv[:,1]
    y = dv[:,0]
    ax.scatter(x,y)
    plt.title('sample data')
    plt.ylabel('line 1')
    plt.xlabel('line 2')
    plt.show()

graph()

"""

arr = []
arrmin = []

with open(r'test_PCA.csv') as cs:
    read = csv.reader(cs)

    column0 = [row[0] for row in read]

with open(r'test_PCA.csv') as cs:
    read = csv.reader(cs)

    column1 = [row[1] for row in read]
"""